package fr.umlv.m2.jee.pmlv.persistence.cursus;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import fr.umlv.m2.jee.pmlv.persistence.subject.Subject;

@SuppressWarnings("serial")
@Entity
@Table(name="Specialty__Subject" )
public class SpecialtySubject implements Serializable {
	@Id
	@GeneratedValue
	@Column(name="id")
	private long id;
	
	@OneToOne
	@JoinColumn(name="specialty_id")
	private Specialty specialty;
	
	@OneToOne
	@JoinColumn(name="subject_id")
	private Subject subject;
	
	@Column(name="ects")
	private int ects;
	
	@Column(name="year")
	private int year;
	
	@Column(name="semester")
	private int semester;
	
	public void setId(long id) {
		this.id = id;
	}
	public long getId() {
		return id;
	}
	public void setSpecialty(Specialty specialty) {
		this.specialty = specialty;
	}
	public Specialty getSpecialty() {
		return specialty;
	}
	public void setSubject(Subject subject) {
		this.subject = subject;
	}
	public Subject getSubject() {
		return subject;
	}
	public void setEcts(int ects) {
		this.ects = ects;
	}
	public int getEcts() {
		return ects;
	}
	public void setYear(int year) {
		this.year = year;
	}
	public int getYear() {
		return year;
	}
	public void setSemester(int semester) {
		this.semester = semester;
	}
	public int getSemester() {
		return semester;
	}
}
